<div class="row row-cards row-deck">
  <div class="col-12">
    <div class="card">
      <table class="table table-hover table-outline table-vcenter text-nowrap card-table">
        <thead>
          <tr>
            <th class="text-center w-1"><i class="icon-people"></i></th>
            <th>中奖用户</th>
            <th>中奖用户手机</th>
            <th>奖品</th>
            <th>已领奖</th>
            <th class="text-center"><i class="icon-settings"></i></th>
          </tr>
        </thead>
        <tbody>
          <% @user_scratch_card_awards.each do |user_scratch_card_award| %>
          <tr>
            <td class="text-center">
              <div class="avatar d-block" style="background-image: url(<%= user_scratch_card_award.user.avatar.url %>)">
                <span class="avatar-status bg-green"></span>
              </div>
            </td>
            <td>
              <div><%= user_scratch_card_award.user.name %></div>
              <div class="small text-muted">
                <%= formattime(user_scratch_card_award.created_at, unit: "hour") %>
              </div>
            </td>
            <td>
              <div><%= user_scratch_card_award.user.phone %></div>
            </td>
            <td>
              <div><%= user_scratch_card_award.scratch_card_award.name %></div>
            </td>
            <td>
              <div><%= user_scratch_card_award.received ? "已领奖" : "未领奖" %></div>
            </td>
            <td class="text-center">
              <div class="item-action dropdown">
                <a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fe fe-more-vertical"></i></a>
                <div class="dropdown-menu dropdown-menu-right">
                  <a href="<%= edit_admin_user_scratch_card_award_path(user_scratch_card_award) %>" class="dropdown-item"><i class="dropdown-icon fe fe-tag"></i> 修改 </a>
                  <%= link_to admin_user_scratch_card_award_path(user_scratch_card_award), class: "dropdown-item", method: :delete do %>
                    <i class="dropdown-icon fe fe-edit-2"></i> 删除 
                  <% end %>
                </div>
              </div>
            </td>
          </tr>
          <% end %>
        </tbody>
      </table>
      <div class="card-footer">
        <%= paginate @user_scratch_card_awards %>
      </div>
    </div>
  </div>
</div>